package com.atguigu.spzx.sms.config;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "spzx.sms")
public class SmsProperties {
    private String host;
    private String path;
    private String method;
    private String appcode;
    private String template_id;

    public static String HOST;
    public static String PATH;
    public static String METHOD;
    public static String APPCODE;
    public static String TEMPLATE_ID;

    @PostConstruct
    public void init(){
        HOST = this.host;
        PATH = this.path;
        METHOD = this.method;
        APPCODE = this.appcode;
        TEMPLATE_ID = this.template_id;
    }
}
